package com.southminority.ethnic.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.southminority.ethnic.column.ExcelColumn;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
public class BasePoJo {
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    @ExcelColumn(name = "创造时间",columnWidth = 25, hidden = true)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "修改时间")
    @ExcelColumn(name = "修改时间",columnWidth = 25, hidden = true)
    private Date updateTime;

    /**
     * 逻辑删除（0：未删除；1：已删除）
     */
    @TableLogic(value = "0", delval = "1")
    @Schema(description = "逻辑删除（0：未删除；1：已删除）")
    @ExcelColumn(name = "逻辑删除（0：未删除；1：已删除）",columnWidth = 10, hidden = true)
    private Integer isDeleted;

    // 移除构造函数中的时间设置，让MyBatis Plus自动填充处理器来处理
}
